<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/res/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="rong.common.entity.Article"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${site}用户编辑页</title>
<%@ include file="/res/common/meta.jsp"%>
<!-- link href="${ctx}/res/css/" type="text/css" rel="stylesheet"  -->
<script src="${ctx}/res/js/jquery-1.2.6.js" type="text/javascript"></script>
<script src="${ctx}/res/js/main-frame-style.js" type="text/javascript"></script>
<%@ include file="/res/common/js-css.jsp"%>
<script type="text/javascript">
function check(){
	if($("#title").val()==""){
		alert("请输入文章标题!");
	}else if($("#cateid").val()=="0"){
		alert("请选择文章栏目!");
	}else{
		$("#aform").submit();
	}
}
</script>
<style type="text/css">
<!--
.content .list div {
	width: 300px;
}
-->
</style>
<link href="${ctx}/res/css/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {
	color: #FF0000
}
-->
</style>
</head>

<body>
<div class="content">
<div class="title">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="63%"><strong>新闻编辑</strong></td>
		<td width="30%" align="right"><a href="article">新闻列表</a> - <a
			href="category!input">添加栏目</a></td>
		<td width="2%"></td>
		<td width="5%"><img src="${ctx}/res/images/up1.gif" border="0"
			class="close" /></td>
	</tr>
</table>
</div>
<span class="list">
<form action="article!save.action" method="post" id="aform"><input
	type="hidden" name="id" value="${model.id}" />
<table width="90%" border="0" align="center" cellpadding="0"
	cellspacing="0">
	<tr>
		<td width="15%" height="30" align="center">&nbsp;</td>
		<td height="25"><span class="STYLE1"> <s:property
			value="exception.message" /> <s:property value="message" /> </span></td>
	</tr>
	<tr>
		<td width="15%" height="30" align="center">新闻标题</td>
		<td height="25"><input type="text" name="title"  id="title"
			value="${model.title}" /> <span class="STYLE1">*</span></td>
	</tr>
	<tr>
		<td height="30" align="center">新闻栏目</td>
		<td height="25">
		<c:set var="selectedCate" value="${model.category.id}"/>
		<!-- 或者<s:set name="selectedCate" value="model.category.id"/> -->
		<select name="category.id" id="cateid">
			<option value="0">--请选择--</option>
			<s:iterator value="allCategorys" var="cate">
				<option value="${id}"<s:if test="#cate.id == #selectedCate"> selected="selected"</s:if>>${name}</option>
			</s:iterator>
		</select> <span class="STYLE1">*</span></td>
	</tr>
	<tr>
		<td height="30" align="center">作者</td>
		<td height="25"><input name="author" type="text"
			value="${model.author}" /></td>
	</tr>
	<tr>
		<td height="30" align="center">提交者</td>
		<td height="25"><input name="adder" type="text"
			value="${model.adder}" /></td>
	</tr>
	<tr>
		<td height="30" align="center">内容</td>
		<td height="25">
    <!-- INPUT type="hidden" name="content" value="${model.content}"  -->
	<textarea name="content" style="display: none;">${model.content}</textarea>
	<IFRAME ID="eWebEditor1" src="../../../res/editor/eWebEditor.jsp?id=content&style=standard" frameborder="0" scrolling="no" width="650" height="350"></IFRAME>
		</td>
	</tr>
	<tr>
		<td height="30" align="center"><input type="button" value="保存" onclick="check();" /></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td align="center">&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
</table>
</form>
</span></div>



</body>

</html>
